<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<html>
	<head>
		<title>盘库详情-金融风险管理系统</title>
		<script src="${contextPath}/scripts/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
		<script type="text/javascript">
			function jumpPage(page) {
				var searchForm = document.searchForm;
				searchForm.action = "<s:property value='contextPath'/>/cs/view.do?currentPage=" + page;
				searchForm.submit();
			}
			
			function searchcf(){
				var searchForm = document.searchForm;
				searchForm.action = "<s:property value='contextPath'/>/cs/view.do";
				searchForm.submit();
			}
			
			function exportcf(){
				var searchForm = document.searchForm;
				searchForm.action = "<s:property value='contextPath'/>/cs/exportView.do";
				searchForm.submit();
			}
		</script>
	</head>
	<body>
	<div class="navigation">
	    <span><a href="javascript:window.history.back();"><img src="${contextPath}/images/back_nav_btn.png" /></a>
	    <a href="javascript:window.history.back();">返回</a>
	    <a href="javascript:window.history.forward();"><img src="${contextPath}/images/go_nav_btn.png" /></a>
	     <a href="javascript:window.history.forward();">前进</a>
	    <a href="javascript:window.location.reload();"><img src="${contextPath}/images/refresh_nav_btn.png" /></a>
	     <a href="javascript:window.location.reload();">刷新</a>
	    </span>盘库管理&gt;&gt;盘库&gt;&gt;详情
  	</div>
  	
  	<div class="xt_main_right_center">
  		<table width="100%" border="0" cellpadding="1" cellspacing="1">
			<tr>
				<td class="left-td-width-bg">
					区域经理：
				</td>
				<td class="bline" align="left">
					<s:property value="entity.areaManager.realName"/>
				</td>
				<td class="left-td-width-bg">
					店号：
				</td>
				<td  class="bline" align="left">
					<s:property value="entity.shop.shopMark"/>
				</td>
				<td class="left-td-width-bg">
					驻店顾问：
				</td>
				<td class="bline" align="left">
					<s:property value="entity.shopUser.realName"/>
				</td>
			</tr>
			<tr>
				<td class="left-td-width-bg">
					应在库合格证：
				</td>
				<td class="bline" align="left">
					<s:if test="page!=null&&page.result!=null">
						<s:property value="page.result.size"/>	
					</s:if>
					<s:else>0</s:else>
				</td>
				<td class="left-td-width-bg">
					应在库车：
				</td>
				<td class="bline" align="left">
					<s:if test="page!=null&&page.result!=null">
						<s:property value="page.result.size"/>	
					</s:if>
					<s:else>0</s:else>
				</td>
				<td class="left-td-width-bg">
					店名：
				</td>
				<td class="bline" align="left">
					<s:property value="entity.shop.shopName"/>
				</td>
			</tr>
			<tr>
				<td class="left-td-width-bg">
					盘库方式：
				</td>
				<td class="bline" align="left">
					<s:if test="entity.live">现场</s:if><s:else>非现场</s:else>
				</td>
				<td class="left-td-width-bg">
					盘库来源：
				</td>
				<td class="bline" align="left">
					<s:property value="entity.source.name"/>
				</td>
				<td class="left-td-width-bg">
					盘库人：
				</td>
				<td class="bline" align="left">
					<s:property value="entity.sponsor.realName"/>
				</td>
			</tr>
			<tr>
				<td class="left-td-width-bg">
					盘库结果：
				</td>
				<td class="bline" align="left">
					<s:if test="entity.success==null">未结束</s:if>
					<s:elseif test="entity.success">成功</s:elseif><s:else>失败</s:else>
				</td>
				<td class="left-td-width-bg">
					附件：
				</td>
				<td class="bline" align="left" colspan="3">
					<s:iterator value="attachs" >
					<div style="display: inline">
						<a href="${contextPath}/attach/download.do?id=<s:property value="id"/>" ><s:property value="name"/></a>&nbsp;
					</div>
					</s:iterator>
				</td>
			</tr>
			<tr>
				<td class="left-td-width-bg">
					备注：
				</td>
				<td class="bline" align="left" colspan="5">
					<s:property value="entity.remark"/>
				</td>
			</tr>
			<tr>
				<td class="left-td-width-bg">
					结果备注：
				</td>
				<td class="bline" align="left" colspan="5">
				<textarea  rows="8" cols="200"  class="input_textarea_width60" disabled="disabled"><s:property value="entity.resultRemark"/></textarea>
				</td>
			</tr>
		</table>
  	</div>
  	<br/>

	<form id="searchForm" name="searchForm" action="view.do" method="post">
	<table width="90%" border="0" cellpadding="0" cellspacing="0">
	  <tr>
	  <td>
	    	渠道:
	    	<%-- <input name="option.certification.brand.name" class="input" style="width: 120px" value="<s:property value='option.certification.brand.name'/>" /> --%>
	    	<select  class="input" name="option.certification.brand.name" id="select2" style="width: 120px">
		       		<option  value="">****请选择****</option>
			         <s:iterator value="brandList" status="i" id="b">
			          <option <s:if test='option.certification.brand.name==#b.name'>selected="selected"</s:if>  value="${b.name }">${b.name }</option>
			          </s:iterator>
		      </select>
	    	金融机构:
	    	<%-- <input name="option.certification.financial.name" class="input" style="width: 120px" value="<s:property value='option.certification.financial.name'/>" /> --%>
	    	<select  class="input" name="option.certification.financial.name" id="select2" style="width: 120px">
		        <option  value="">****请选择****</option>
		         <s:iterator value="fiList" status="i" id="b">
		          <option <s:if test='option.certification.financial.name==#b.name'>selected="selected"</s:if>  value="${b.name }">${b.name }</option>
		          </s:iterator>
		      </select>
	    	合格证号:<input name="option.certification.certificationNum" class="input" style="width: 120px" value="<s:property value='option.certification.certificationNum'/>" />
	    	车架号:<input name="option.certification.chassis" class="input" style="width: 120px" value="<s:property value='option.certification.chassis'/>" />
	    	<input type="button" onclick="searchcf()"  value=""  class="btn_query"/>
	    	<td height="25" align="right"><a href="javascript:exportcf()"><img src="${contextPath}/images/export.png" alt="导出"  /></a>
	    </td>
	  </tr>
	</table> 
	<!-- 库存清单开始 -->	
	<s:if test="page!=null&&page.result!=null">
		<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
		  <tr> 
		    <td width="3%" class="top-td-width-bg">序号</td>
		    <td width="8%" class="top-td-width-bg">渠道</td>
		    <td width="8%" class="top-td-width-bg">金融机构</td>
		    <td width="8%" class="top-td-width-bg">合格证号</td>
		    <td width="8%" class="top-td-width-bg">车架号</td>
		    <td width="8%" class="top-td-width-bg">发动机号</td>
		    <td width="8%" class="top-td-width-bg">车型</td>
		    <td width="8%" class="top-td-width-bg">单价</td>
		    <td width="8%" class="top-td-width-bg">入库日期</td>
		    <td width="8%" class="top-td-width-bg">合格证状态</td>
		    <td width="6%" class="top-td-width-bg">车辆状态</td>
		    <td width="9%" class="top-td-width-bg">二库地址</td>
		    <td width="9%" class="top-td-width-bg">备注</td>
		  </tr>
		 <s:iterator value="page.result" status="stx" >
			<tr height="26" align="center" bgcolor="#FFFFFF" onmousemove="javascript:this.bgColor='#FCFDEE';" onmouseout="javascript:this.bgColor='#FFFFFF';"> 
			 	<td align="center"><s:property value="#stx.index+1"/></td>
			    <td align="center"><s:property value="certification.brand.name"/></td>
			    <td align="center"><s:property value="certification.financial.name"/></td>
			    <td align="center"><s:property value="certification.certificationNum"/></td>
			    <td align="center"><s:property value="certification.chassis"/></td>
			    <td align="center"><s:property value="certification.engine"/></td>
			    <td align="center"><s:property value="certification.motorcycleType"/></td>
			    <td align="right"><s:property value="formatAmount(certification.supplyPrice)"/></td>
			    <td align="center"><s:date name="certification.warehouseDate" format="yyyy-MM-dd"/></td>
			    <td align="center">
			    	<%-- <s:if test="certification.theAddress!=null&&certification.state.index==2">在库(二网)</s:if><s:else><s:property value="certification.state.name" /></s:else> --%>
			    	<s:property value="cfStatusArea.name"/>
			    </td>
			    <td align="center">
			    	<s:property value="carStatusArea.name"/>
			    </td>
		    	<td align="center"><s:property value="certification.theAddress"/></td>
			    <td align="center"><s:if test="remark!=null&&remark!='null'"><s:property value="remark" /></s:if></td>
			</tr>
		</s:iterator>
		<tr bgcolor="#F9FCEF"> 
		 <td height="36" colspan="13" align="center">
				<%@ include file="/WEB-INF/view/common/pagination.jsp"%>
		 </td>
		</tr>
		</table>
	</s:if>
	
	<input type="hidden" name="redirectUrl" value='<s:property value='redirectUrl'/>'/>
	<input type="hidden" name="entity.id" value='<s:property value='entity.id'/>'/>
	</form>
	</body>
</html>